package com.cqsd.bean.beantest;

import com.cqsd.ioc.annotation.Component;

import java.util.StringJoiner;

/**
 * @author caseycheng
 * @date 2023/3/27-17:37
 **/
@Component
public class Person {
    private String name;

    public Person(String name) {
        this.name = name;
    }

    /**
     * 需要先解析@bean的对象
     * @param name
     * @return
     */

    public Person setName(String name) {
        this.name = name;
        return this;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Person.class.getSimpleName() + "[", "]")
                .add("name='" + name + "'")
                .toString();
    }
}
